#include "GnSystemDefine.h"

class GnStream;
#define GnDeclareAbstractBinaryStream \
	public: \
	virtual void LoadBinary( GnStream& gnStream ); \
	virtual void SaveBinary( GnStream& gnStream )

#define GnDeclareAbstractAsciiStream \
	public: \
	virtual void LoadAscii( GnStream& gnStream ); \
	virtual void SaveAscii( GnStream& gnStream )

#define GnDeclareBinaryStream \
	GnDeclareAbstractBinaryStream; \
	static GnObject* CreateObject( const gtchar** arguments )

#define GnDeclareAsciiStream \
	GnDeclareAbstractAsciiStream; \
	static GnObject* CreateObject( const gtchar** arguments )

#define GnDeclareAllStream \
	GnDeclareAbstractBinaryStream; \
	GnDeclareAbstractAsciiStream; \
	static GnObject* CreateObject( const gtchar** arguments )

#define GnImplementCreateObject( classname ) \
	GnObject* classname::CreateObject( const gtchar** arguments ) \
	{ \
		classname* pkObject = GnNew classname; \
		GnAssert( pkObject != NULL ); \
		return pkObject; \
	}